package com.gzh.teaching.model.vo;

import com.gzh.core.model.vo.BasePageParam;
import com.gzh.core.util.NumericHelper;
import com.gzh.teaching.service.dto.QueryIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @Author guanzh
 * @Date 2022/3/7 9:03
 * @Description
 */
@Setter
@Getter
@ToString
public class QueryParam extends BasePageParam {

    private String classId;

    private String tacademyId;

    private String status;


    public QueryIn paramToIn(Integer userId) {
        QueryIn in = new QueryIn();
        in.setPageNum(this.getPageNum());
        in.setTacademyId(NumericHelper.toInteger(this.tacademyId));
        in.setClassId(NumericHelper.toInteger(this.classId));
        in.setStatus(NumericHelper.toInteger(this.status));
        in.setPageSize(this.getPageSize());
        in.setUserId(userId);
        return in;
    }
}
